<div id="layout_main_top">

</div>
<div id="layout_main">

{if !isset($errormessage)}

<DIV class="MenuHead">
Step 2
</DIV>

<DIV class="MenuText">
Please select all RP events you wish to add to this raid.<br />You can add these events to players in step 3. <br />Please note that you can assign any even to any player.<br><br>
When you are finished and the list is complete press 'Next Step'.
</DIV>

<br />
<form name="manualrp" ACTION="index.php?page=manual&amp;action=manual&amp;raid={$selected_raid}&amp;step=2" method="POST">
<input type="hidden" name="main_id_list" value="{$main_id_list}">
<input type="hidden" name="subaction" value="update_list">
<input type="hidden" name="step" value="{$step}">

<DIV class="MenuText">
<input type="submit" name="submit" value="Next Step">
</DIV>

<table id="main_table" cellspacing='0' >
<tr class="menu_header">
	<th>#</th>
	<th class="left">
			Description
	</th>
	<th class="left">
			RP
	</th>
	<th>
        Options
	</th>
</tr>
<tr class="menu_header">
	<td colspan='3'>
	</td>
	<td>
        <input type="image" src="./images/buttons/delete.gif" alt="" name="submit" value="delete"  style="border: 0px; background: none;" />
	</td>
</tr>
{foreach name=events item=event from=$events}

<tr class="{if $character.user_id eq $user_id}row_3{else}{cycle values="row_1,row_2"}{/if}">
	<td>{$smarty.foreach.events.iteration}</td>
	<td class="left">{$event.description}</td>
	<td class="left">{$event.rp}</td>
	<td>
	    <input type="hidden" name="MainDescription{$event.id}" value="{$event.description}">
	    <input type="hidden" name="MainRP{$event.id}" value="{$event.rp}">
	    <input type="hidden" name="Main[]" value="{$event.id}">
        <input type="checkbox" name="CheckEvent{$event.id}">
	</td>
</tr>

{foreachelse}
<tr class="{cycle values="row_1,row_2"}">
	<td colspan=12>No Events could be found.</td>
</tr>

{/foreach}

<tr class="menu_header">
	<td colspan=12>Add Event</td>
</tr>

<tr class="menu_header">
	<td colspan=12>
        Description: <input type="text" name="description" class="hugetext"> RP: <input type="text" name="rp" class="smalltext">
	</td>
</tr>
<tr class="menu_header">
	<td colspan=12><input type="submit" name="submit" value="Add Event"></td>
</tr>

<tr class="menu_header">
	<td colspan=12><br /></td>
</tr>



</form>
<tr class="menu_footer">
	<td colspan=12></td>
</tr>

</table>


{else}


<DIV class="MenuHead">
Succesfull!
</DIV>

<DIV class="MenuText">
{$message}
</DIV>




{/if}

</div>
<div id="layout_main_bottom">

</div>